-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quote stripping in log command #4429
base: main
Are you sure you want to change the base?
Conversation
|
||
test_log "test" "test" | ||
test_log "test;" "test" | ||
test_log "test;;" "test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows e.g.
log "yosys> flatten;;"
, logging the unquoted textyosys> flatten;;
.
Doesn't this line test that the semicolons would be discarded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, contrast with the later test_log "\"test;;\"" "test;;"
which tests if putting them in quotes prevents removing them, i.e. "\"test;;\""
-> log "test;;"
because bash doesn't include the outer quotes when doing the variable substitution.
Currently provides tests for logging quoted strings.
We can now fake the `yosys> flatten;;` line, so we no longer need to explain the split flatten/clean.
If a command has a single argument, and that argument is quoted, strip the quotes.
`log "` should log `"`. Also fix test script to correctly fail when more than one test fails.
a26f648
to
7d3c69e
Compare
What are the reasons/motivation for this change?
Allows e.g.
log "yosys> flatten;;"
, logging the unquoted textyosys> flatten;;
.Explain how this is achieved.
If the text to log starts and ends with a quotation mark, drop the first and last characters.
If applicable, please suggest to reviewers how they can test the change.